namespace YXShop.ExcelLite
{
    using System;

    public class NamedRange
    {
        private int index;
        private string name;
        private NamedRangeCollection parent;
        private CellRange range;

        internal NamedRange(NamedRangeCollection parent, int index, string name, CellRange range)
        {
            this.parent = parent;
            this.index = index;
            this.name = name;
            this.range = range;
        }

        public void Delete()
        {
            this.parent.DeleteInternal(this.index);
        }

        public string Name
        {
            get
            {
                return this.name;
            }
        }

        public CellRange Range
        {
            get
            {
                return this.range;
            }
        }
    }
}

